package com.example.design.patterns.冰河.创建型模式.单例;

/**
 * 代码二：饿汉模式，单例实例在类装载的时候进行创建，线程安全
 */
public class SingletonExample2 {
    private static SingletonExample2 instance = new SingletonExample2();

    ;

    private SingletonExample2() {
    }

    private static SingletonExample2 getInstance() {
        return instance;
    }
}
